<?php

class M_payee Extends MY_Model{
	
	public function __construct()
	{
		parent::__construct();
	}
	
	public function get_payee($id)
	{
		$sql = "SELECT *
				FROM payees 
				WHERE student_profile_id = ? ";

		$query = $this->db->query($sql,array($id));
		return $query->num_rows() > 0 ? $query->row() : FALSE;
	}

	public function insert_applicant_payee($data)
	{
		$this->db->insert('payees',$data);
		return $this->db->affected_rows() >= 1 ? TRUE : FALSE;
	}
	
	public function update_applicant_payee($profile_id, $data)
	{
		$this->db->where('student_profile_id', $profile_id);
		$this->db->update('payees', $data); 
		return $this->db->affected_rows() >= 1 ? TRUE : FALSE;
	}
}